<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: Ros</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: Ros</h1>

    



<section>

<header>
    <h2>
    Ros
    </h2>
    
</header>

<article>
    <div class="container-overview">
    

    
        
<dt>
    <h4 class="name" id="Ros"><span class="type-signature"></span>new Ros<span class="signature">(options)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Manages connection to the server and all interactions with ROS.

Emits the following events:
 * 'error' - there was an error with ROS
 * 'connection' - connected to the WebSocket server
 * 'close' - disconnected to the WebSocket server
 * <topicName> - a message came from rosbridge with the given topic name
 * <serviceID> - a service response came from rosbridge with the given ID
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">possible keys include:
  * url (optional) - the WebSocket URL for rosbridge (can be specified later with `connect`)
  * groovyCompatibility - don't use interfaces that changed after the last groovy release or rosbridge_suite and related tools (defaults to true)</td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Ros.js.html">core/Ros.js</a>, <a href="Ros.js.html#line29">line 29</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

    
    </div>

    

    

    

    

     

    

    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
<dt>
    <h4 class="name" id="authenticate"><span class="type-signature"></span>authenticate<span class="signature">(mac, client, dest, rand, t, level, end)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Sends an authorization request to the server.
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>mac</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">MAC (hash) string given by the trusted source.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>client</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">IP of the client.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>dest</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">IP of the destination.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>rand</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">Random string given by the trusted source.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>t</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">Time of the authorization request.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>level</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">User level as a string given by the client.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>end</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">End time of the client's session.</td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Ros.js.html">core/Ros.js</a>, <a href="Ros.js.html#line82">line 82</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="callOnConnection"><span class="type-signature"></span>callOnConnection<span class="signature">()</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Sends the message over the WebSocket, but queues the message up if not yet
connected.
    </div>
    

    

    

    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Ros.js.html">core/Ros.js</a>, <a href="Ros.js.html#line102">line 102</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="close"><span class="type-signature"></span>close<span class="signature">()</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Disconnect from the WebSocket server.
    </div>
    

    

    

    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Ros.js.html">core/Ros.js</a>, <a href="Ros.js.html#line65">line 65</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="connect"><span class="type-signature"></span>connect<span class="signature">(url)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Connect to the specified WebSocket.
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">WebSocket URL for Rosbridge</td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Ros.js.html">core/Ros.js</a>, <a href="Ros.js.html#line58">line 58</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="decodeTypeDefs"><span class="type-signature"></span>decodeTypeDefs<span class="signature">(defs)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Decode a typedefs into a dictionary like `rosmsg show foo/bar`
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>defs</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">array of type_def dictionary</td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Ros.js.html">core/Ros.js</a>, <a href="Ros.js.html#line240">line 240</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="getMessageDetails"><span class="type-signature"></span>getMessageDetails<span class="signature">(callback, message)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Retrieves a detail of ROS message.
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">function with params:
  * details - Array of the message detail</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>message</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">String of a topic type</td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Ros.js.html">core/Ros.js</a>, <a href="Ros.js.html#line221">line 221</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="getNodes"><span class="type-signature"></span>getNodes<span class="signature">(callback)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Retrieves list of active node names in ROS.
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">function with the following params:
  * nodes - array of node names</td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Ros.js.html">core/Ros.js</a>, <a href="Ros.js.html#line161">line 161</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="getParams"><span class="type-signature"></span>getParams<span class="signature">(callback)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Retrieves list of param names from the ROS Parameter Server.
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">function with params:
 * params - array of param names.</td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Ros.js.html">core/Ros.js</a>, <a href="Ros.js.html#line181">line 181</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="getServices"><span class="type-signature"></span>getServices<span class="signature">(callback)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Retrieves list of active service names in ROS.
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">function with the following params:
  * services - array of service names</td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Ros.js.html">core/Ros.js</a>, <a href="Ros.js.html#line141">line 141</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="getTopics"><span class="type-signature"></span>getTopics<span class="signature">(callback)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Retrieves list of topics in ROS as an array.
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">function with params:
  * topics - Array of topic names</td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Ros.js.html">core/Ros.js</a>, <a href="Ros.js.html#line121">line 121</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="getTopicType"><span class="type-signature"></span>getTopicType<span class="signature">(callback)</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Retrieves a type of ROS topic.
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last">function with params:
  * type - String of the topic type</td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Ros.js.html">core/Ros.js</a>, <a href="Ros.js.html#line200">line 200</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

        </dl>
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="global.html#ActionClient">ActionClient</a></li><li><a href="Goal.html">Goal</a></li><li><a href="global.html#Message">Message</a></li><li><a href="Param.html">Param</a></li><li><a href="global.html#Pose">Pose</a></li><li><a href="Quaternion.html">Quaternion</a></li><li><a href="Ros.html">Ros</a></li><li><a href="global.html#Service">Service</a></li><li><a href="ServiceRequest.html">ServiceRequest</a></li><li><a href="global.html#ServiceResponse">ServiceResponse</a></li><li><a href="SimpleActionServer.html">SimpleActionServer</a></li><li><a href="TFClient.html">TFClient</a></li><li><a href="global.html#Topic">Topic</a></li><li><a href="Transform.html">Transform</a></li><li><a href="UrdfBox.html">UrdfBox</a></li><li><a href="global.html#UrdfColor">UrdfColor</a></li><li><a href="UrdfCylinder.html">UrdfCylinder</a></li><li><a href="UrdfLink.html">UrdfLink</a></li><li><a href="global.html#UrdfMaterial">UrdfMaterial</a></li><li><a href="UrdfMesh.html">UrdfMesh</a></li><li><a href="UrdfModel.html">UrdfModel</a></li><li><a href="UrdfSphere.html">UrdfSphere</a></li><li><a href="global.html#UrdfVisual">UrdfVisual</a></li><li><a href="global.html#Vector3">Vector3</a></li></ul><h3>Global</h3><ul><li><a href="global.html#assign">assign</a></li><li><a href="global.html#decompressPng">decompressPng</a></li><li><a href="global.html#EventEmitter2">EventEmitter2</a></li><li><a href="global.html#onclose">onclose</a></li><li><a href="global.html#onerror">onerror</a></li><li><a href="global.html#onmessage">onmessage</a></li><li><a href="global.html#onopen">onopen</a></li><li><a href="global.html#ROSLIB">ROSLIB</a></li><li><a href="global.html#RosTCP">RosTCP</a></li><li><a href="global.html#SocketAdapter">SocketAdapter</a></li><li><a href="global.html#UrdfTypes">UrdfTypes</a></li><li><a href="global.html#WebSocket">WebSocket</a></li></ul>
</nav>

<br clear="both">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> on Wed Feb 04 2015 09:12:20 GMT-0500 (EST)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>